
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <title>9.7.&nbsp;Segue </title>
      <link rel="stylesheet" href="../diveintopython.css" type="text/css">
      <link rev="made" href="mailto:f8dy@diveintopython.org">
      <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
      <meta name="keywords" content="Python, Dive Into Python, tutorial, object-oriented, programming, documentation, book, free">
      <meta name="description" content="Python from novice to pro">
      <link rel="home" href="../toc/index.html" title="Dive Into Python">
      <link rel="up" href="index.html" title="第&nbsp;9&nbsp;章&nbsp;XML 处理">
      <link rel="previous" href="attributes.html" title="9.6.&nbsp;访问元素属性">
      <link rel="next" href="../scripts_and_streams/index.html" title="第&nbsp;10&nbsp;章&nbsp;脚本和流">
   </head>
   <body>
      <table id="Header" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
         <tr>
            <td id="breadcrumb" colspan="5" align="left" valign="top">导航：<a href="../index.html">起始页</a>&nbsp;&gt;&nbsp;<a href="../toc/index.html">Dive Into Python</a>&nbsp;&gt;&nbsp;<a href="index.html">XML 处理</a>&nbsp;&gt;&nbsp;<span class="thispage">Segue </span></td>
            <td id="navigation" align="right" valign="top">&nbsp;&nbsp;&nbsp;<a href="attributes.html" title="上一页: “访问元素属性”">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;<a href="../scripts_and_streams/index.html" title="下一页: “脚本和流”">&gt;&gt;</a></td>
         </tr>
         <tr>
            <td colspan="3" id="logocontainer">
               <h1 id="logo"><a href="../index.html" accesskey="1">深入 Python :Dive Into Python 中文版</a></h1>
               <p id="tagline">Python 从新手到专家 [Dip_5.4b_CPyUG_Release]</p>
            </td>
            <td colspan="3" align="right">
               <form id="search" method="GET" action="http://www.google.com/custom">
                  <p><label for="q" accesskey="4">Find:&nbsp;</label><input type="text" id="q" name="q" size="20" maxlength="255" value=""> <input type="submit" value="搜索"><input type="hidden" name="domains" value="woodpecker.org.cn/diveintopython"><input type="hidden" name="sitesearch" value="www.woodpecker.org.cn/diveintopython"></p>
               </form>
            </td>
         </tr>
      </table>
      <!--#include virtual="/inc/ads" -->
      <div class="section" lang="zh_cn">
         <div class="titlepage">
            <div>
               <div>
                  <h2 class="title"><a name="kgp.segue"></a>9.7.&nbsp;Segue <sup>[<a name="d0e25195" href="#ftn.d0e25195">9</a>]</sup></h2>
               </div>
            </div>
            <div></div>
         </div>
         <div class="abstract">
            <p>以上就是 XML 的核心内容。下一章将使用相同的示例程序，但是焦点在于能使程序更加灵活的其它方面：使用输入流处理，使用 <tt class="function">getattr</tt> 进行方法分发，并使用命令行标识允许用户重新配置程序而无需修改代码。
            </p>
         </div>
         <p>在进入下一章前，你应该没有困难的完成这些事情：</p>
         <div class="itemizedlist">
            <ul>
               <li>使用 <tt class="filename">minidom</tt> <a href="parsing_xml.html" title="9.3.&nbsp;XML 解析">解析 <span class="acronym">XML</span> 文档</a>，<a href="searching.html" title="9.5.&nbsp;搜索元素">搜索已解析文档</a>，并以任意顺序访问<a href="attributes.html" title="9.6.&nbsp;访问元素属性">元素属性</a>和<a href="../scripts_and_streams/child_nodes.html" title="10.4.&nbsp;查找节点的直接子节点">元素子元素</a></li>
               <li>将复杂的库组织为<a href="packages.html" title="9.2.&nbsp;包">包</a></li>
               <li>将 <a href="unicode.html" title="9.4.&nbsp;Unicode">unicode 字符串转换</a>为不同的字符编码
               </li>
            </ul>
         </div>
         <div class="footnotes">
            <h3 class="footnotetitle">Footnotes</h3>
            <div class="footnote">
               <p><sup>[<a name="ftn.d0e25195" href="#d0e25195">9</a>] </sup>“Segue”是音乐术语，意为“继续演奏”。
               </p>
            </div>
         </div>
      </div>
      <table class="Footer" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
         <tr>
            <td width="35%" align="left"><br><a class="NavigationArrow" href="attributes.html">&lt;&lt;&nbsp;访问元素属性</a></td>
            <td width="30%" align="center"><br>&nbsp;<span class="divider">|</span>&nbsp;<a href="index.html#kgp.divein" title="9.1.&nbsp;概览">1</a> <span class="divider">|</span> <a href="packages.html" title="9.2.&nbsp;包">2</a> <span class="divider">|</span> <a href="parsing_xml.html" title="9.3.&nbsp;XML 解析">3</a> <span class="divider">|</span> <a href="unicode.html" title="9.4.&nbsp;Unicode">4</a> <span class="divider">|</span> <a href="searching.html" title="9.5.&nbsp;搜索元素">5</a> <span class="divider">|</span> <a href="attributes.html" title="9.6.&nbsp;访问元素属性">6</a> <span class="divider">|</span> <span class="thispage">7</span>&nbsp;<span class="divider">|</span>&nbsp;
            </td>
            <td width="35%" align="right"><br><a class="NavigationArrow" href="../scripts_and_streams/index.html">脚本和流&nbsp;&gt;&gt;</a></td>
         </tr>
         <tr>
            <td colspan="3"><br></td>
         </tr>
      </table>
      <div class="Footer">
         <p class="copyright">Copyright © 2000, 2001, 2002, 2003, 2004 <a href="mailto:mark@diveintopython.org">Mark Pilgrim</a></p>
         <p class="copyright">Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007 <a href="mailto:python-cn@googlegroups.com">CPyUG (邮件列表)</a></p>
      </div>
   </body>
</html>